package controller.action;

import java.io.File;
import java.io.IOException;

import model.service.ExamineeService;

import com.opensymphony.xwork2.ActionSupport;

public class SavePhoto extends ActionSupport{
	private String result;
	private File file; 
	private String fileFileName;
	private String userId;
	private String fileFileContentType;
	public String getFileFileContentType() {
		return fileFileContentType;
	}
	public void setFileFileContentType(String fileFileContentType) {
		this.fileFileContentType = fileFileContentType;
	}

	private ExamineeService examineeService;
	public String getResult() {
		return result;
	}
	public void setResult(String result) {
		this.result = result;
	}
	public File getFile() {
		return file;
	}
	public void setFile(File file) {
		this.file = file;
	}
	public String getFileFileName() {
		return fileFileName;
	}
	public void setFileFileName(String fileFileName) {
		this.fileFileName = fileFileName;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public ExamineeService getExamineeService() {
		return examineeService;
	}
	public void setExamineeService(ExamineeService examineeService) {
		this.examineeService = examineeService;
	}
	
	public String savePhoto() throws IOException{
		System.out.println(fileFileName);
		result = examineeService.PhotoUpload(file, fileFileName, userId);
		return SUCCESS;
	}
}
